<!DOCTYPE HTML>
<html>
<body>
<script type="application/javascript;version=1.7">
var audio = new Audio();
audio.src = "audio.ogg";
audio.loop = true;

function runCommands()
{
  switch(location.hash) {
    case '#play':
      audio.play();
      break;
    case '#pause':
      audio.pause();
      break;
    default :
      alert("Undefined command!");
  }
}
window.addEventListener('hashchange', runCommands);
</script>
</body>
</html>